package com.winning.java.generic;

import ch.qos.logback.core.net.SyslogOutputStream;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

import java.io.Console;

/**
 * @author: rqx
 * @create: 2023/6/5 9:50
 * @description:
 */
@Slf4j
public class Main {

    @Test
    public void GenericClassTest()
    {
        var obj1 = new GenericClass<Integer>(100);
        var obj2 = new GenericClass<String>("123");

        log.info("obj1:{}",obj1.GetTypeName());
        log.info("obj2:{}",obj2.GetTypeName());
    }

    @Test
    public void GenericMethodTest()
    {
        var list1 =  GenericMethod.BuildList(1, 2, 3, 4);
        var list2 =  GenericMethod.BuildList("a","b","c","d");

        list1.forEach(System.out::println);
        list2.forEach(System.out::print);
    }
}
